package com.hk.cafe.control;

import com.hk.action.Action;
import com.hk.action.ActionFactory;
import com.hk.bbs.ListAction;
import com.hk.bbs.ViewAction;
import com.hk.bbs.WriteAction;
import com.hk.bbs.WriteGoAction;
import com.hk.photo.PhotoListAction;
import com.hk.photo.PhotoLoadAction;
import com.hk.photo.PhotoViewAction;
import com.hk.photo.PhotoWriteAction;
import com.hk.photo.PhotoWritegoAction;

public class PhotoActionFactory implements ActionFactory{
private static PhotoActionFactory factory;
	
	public static PhotoActionFactory getInstance(){
		if(factory==null){
			factory=new PhotoActionFactory();
		}
		return factory;
	}
		
	public Action getAction(String command){
		Action action=null;
			if(command.equalsIgnoreCase("plist")){
			action=new PhotoListAction();
			
		}else if(command.equalsIgnoreCase("pwrite")){
			action=new PhotoWriteAction();
			
		}else if(command.equalsIgnoreCase("pwritego")){
			action=new PhotoWritegoAction();
			
		}else if(command.equalsIgnoreCase("pview")){
			
			action=new PhotoViewAction();
		}else if(command.equalsIgnoreCase("pload")){
			
			action=new PhotoLoadAction();
		}
		
		return action;
	}//
}
